package com.itheima.tlias84.controller;

import com.itheima.tlias84.service.impl.DataStatisticsServiceImpl;
import com.itheima.tlias84.utils.ResultUtil;
import com.itheima.tlias84.vo.Gender;
import com.itheima.tlias84.vo.Job;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("report")
public class DataStatisticsController {

    @Resource
    DataStatisticsServiceImpl dataStatisticsService;

    @GetMapping("/empGenderData")
    public ResultUtil gender(){
        List<Gender> genders = dataStatisticsService.selectByGender();
        return ResultUtil.success(genders);
    }
    @GetMapping("/empJobData")
    public ResultUtil job(){
        return dataStatisticsService.selectByJob();
    }




}
